package user;

import book.BookList;
import operation.*;

import java.util.Scanner;

//普通用户
public class NormalUser extends User {
    public NormalUser(String name) {
        super(name);
    }
    @Override
    public int menu() {
        System.out.println();
        System.out.println("******* 普通用户菜单 *******");
        System.out.println("******* 1.查找图书 ********");
        System.out.println("******* 2.借阅图书 ********");
        System.out.println("******* 3.归还图书 ********");
        System.out.println("******* 0.退出系统 ********");
        System.out.println("**************************");
        System.out.print("请输入你的选项:");
        Scanner sc = new Scanner(System.in);
        int choice =sc.nextInt();
        return choice;
    }
    public void fun_sel(int pow,BookList bookList) {
        IOPeration[] ioPerations ={new Exit(),new Find(),new Borrowed(),new Return()};
        ioPerations[pow].work(bookList);
    }
}
